import React, {Component} from 'react';
import {Image, StatusBar, Text, TouchableOpacity, View} from 'react-native';
import Styles from './Styles';
import List from '../../components/List_Double';
import LinearGradient from 'react-native-linear-gradient';

export default class Page2 extends BaseComponent {
    static navigationOptions = {
        headerTitle: '微淘',//对页面的配置
        tabBarLabel: '微淘',
        tabBarIcon: ({focused})=>{
            if(focused){
                return (
                    <Image style={Styles.tabBarIcon} source={require('../../images/we_fill.png')}/>
                );
            }
            return (
                <Image style={Styles.tabBarIcon} source={require('../../images/we.png')}/>
            );
        },
    };

    render() {
        const {navigate} = this.props.navigation;
        return (
            <View style={Styles.container}>

                <View style={{flex:1,flexDirection:'column'}}>

                    <StatusBar
                        translucent={true}
                        backgroundColor={"transparent"}/>

                    <LinearGradient
                        start={{x: 0, y: 0}}
                        end={{x: 1, y: 0}}
                        colors={['#FF8F03', '#FF5301']}
                        style={{paddingTop:Config.statusBarHeight}}
                    >
                        <TouchableOpacity
                            style={[Styles.touchStyle,Styles.centerStyle]}
                            onPress={() => navigate('Detail2', {title: 'Detail2', des: '我是返回点击我'})}
                        >
                            <Text style={[Styles.textStyle]}>微淘</Text>
                        </TouchableOpacity>

                    </LinearGradient>

                    <View style={{marginBottom:60,}}>

                        <List />

                    </View>

                </View>

            </View>
        );
    }
}